<template name="myluck">
	<view class="bg-white" style="min-height: 100vh;padding: 0 30rpx;overflow: hidden;max-height: 100vh;"
		:style="{background:'url('+Imgbase+'/'+skin+'_goodindex_bgc.png)','background-size':'100%',}">

		<view class="w100 h-200" style="background-color: red;" @click="gorecycle">
			123
		</view>


		<view class="padding-top-145 Afont" style="">
			<!-- tab 经典皮肤-->
			<view class="df  margin-top-25" v-if="skin == 'classics'">
				<scroll-view scroll-x class="nav w100 fff" scroll-with-animation :scroll-left="scrollLeft"
					style="height: 120upx;overflow: hidden;">
					<view class="tab_item" :class="index==seleon?'open':'no_open'" v-for="(item,index) in selename"
						:key="index" @tap="tabSelect" :data-id="index" @click="sele(item.id,0,index)">
						{{item.name}}
						<view class="w-70 h-8 heng radius-4" v-show="index==seleon">
						</view>
					</view>
				</scroll-view>
			</view>

			<!-- 冬季皮肤 -->
			<view class="df  margin-top-25" v-if="skin == 'winter'">
				<scroll-view scroll-x class="nav w100 fff" scroll-with-animation :scroll-left="scrollLeft"
					style="height: 120upx;overflow: hidden;">
					<view class="tab_item" :class="index==seleon?'openwinter':'no_open'"
						v-for="(item,index) in selename" :key="index" @tap="tabSelect" :data-id="index"
						@click="sele(item.id,0,index)">
						{{item.name}}
						<view class="w-70 h-8 hengwinter radius-4" v-show="index==seleon">
						</view>
					</view>
				</scroll-view>
			</view>

			<!-- 冬季皮肤 -->
			<view class="df  margin-top-25" v-if="skin == 'summer'">
				<scroll-view scroll-x class="nav w100 fff" scroll-with-animation :scroll-left="scrollLeft"
					style="height: 120upx;overflow: hidden;">
					<view class="tab_item" :class="index==seleon?'openwinter':'no_open'"
						v-for="(item,index) in selename" :key="index" @tap="tabSelect" :data-id="index"
						@click="sele(item.id,0,index)">
						{{item.name}}
						<view class="w-70 h-8 hengwinter radius-4" v-show="index==seleon">
						</view>
					</view>
				</scroll-view>
			</view>

			<!-- 新年皮肤 -->
			<view class="df  margin-top-25" v-if="skin == 'newyear'">
				<scroll-view scroll-x class="nav w100 fff" scroll-with-animation :scroll-left="scrollLeft"
					style="height: 120upx;overflow: hidden;">
					<view class="tab_item" :class="index==seleon?'opennewyear':'no_open'"
						v-for="(item,index) in selename" :key="index" @tap="tabSelect" :data-id="index"
						@click="sele(item.id,0,index)">
						{{item.name}}
						<view class="w-70 h-8 hengnewyear radius-4" v-show="index==seleon">
						</view>
					</view>
				</scroll-view>
			</view>

			<!-- 春季皮肤 -->
			<view class="df  margin-top-25" v-if="skin == 'qing'">
				<scroll-view scroll-x class="nav w100 fff" scroll-with-animation :scroll-left="scrollLeft"
					style="height: 120upx;overflow: hidden;">
					<view class="tab_item" :class="index==seleon?'openqing':'no_open'" v-for="(item,index) in selename"
						:key="index" @tap="tabSelect" :data-id="index" @click="sele(item.id,0,index)">
						{{item.name}}
						<view class="w-70 h-8 hengnewyear radius-4" v-show="index==seleon">
						</view>
					</view>
				</scroll-view>
			</view>

			<view class="df padding-left-15">
				<scroll-view scroll-x class="nav w100 fff" scroll-with-animation :scroll-left="scrollLefttwo"
					style="height: 130upx;overflow: hidden;">
					<view class="tab_item Cfont padding-left-20 padding-right-20 h-70 text-center lh-70"
						:class="index==seleontwo?'opend':'no_open'" v-for="(item,index) in twolist" :key="index"
						@tap="tabSelecttwo" :data-id="index"
						:style="{background:index==seleontwo?'url('+Imgbase+'/new_goodmall_img1.png)':'','background-size':'100% 100%',}"
						@click="seletwo(index,item.id,item.pid)">
						{{item.name}}
					</view>
				</scroll-view>
			</view>
		</view>

		<view class="padding-bottom-15 font-24 font-weight-500 Afont" style="color: #2b2b2b;" v-if="canBuyNum >= 0 ">
			本日还可购买{{canBuyNum}}个数码科技产品，刷新时间每天00:00:00
		</view>
		<view class="padding-bottom-15 font-24 font-weight-500 Afont" style="color: #2b2b2b;" v-if="spaceid > 0 ">
			{{spdesc}}
		</view>

		<!-- 列表 -->
		<view class="padding-left-15" style="">

			<scroll-view scroll-y class="w100" style="height: 80vh;" @scrolltolower="onbottom()">

				<!-- 新年皮肤 -->
				<view class="list_item w-210 h-350 radius-14 margin-bottom-35 itemnewyear"
					v-for="(item,index) in comlist" :key="index" v-if="skin == 'newyear'">

					<view class="w-210 h-200 text-center radius-15 overhid imganewyear" @click="godetail(item.id)">

						<image v-if="item.stock == 0" class="w100 h100 bgc" :src=" Imgbase+'/1zhan_selled.png'"
							mode="aspectFill">
						</image>

						<image v-else class="w100 h100 radius-15" :src="item.adimage" mode="aspectFill"></image>
					</view>

					<view class="Afont item_text w100 two-line font-24 h-65" @click="godetail(item.id)">
						{{item.name}}
					</view>

					<view class="flex-between h-40">
						<view class="padding-left-8" @click="godetail(item.id)">
							<view class="item_price font-22  Afont" v-if="item.price !== '0.00'">
								<!-- <text v-if="spaceid > 0">红豆:</text> -->
								<text>￥</text>
								<text class="font-30">{{item.price}}</text>
							</view>
							<view class="item_price font-28 Afont" v-if="item.score > 0">
								积分:{{item.score}}
							</view>
						</view>
						<view class="padding-top-20 padding-right-10" @click="islike(item.id,index)">
							<image :src=" Imgbase+'/new_goodmall_img2.png'" v-if="item.is_collect == 0" mode="aspectFit"
								class="w-35 h-30">
							</image>
							<image :src=" Imgbase+'/new_goodmall_img3.png'" v-else mode="aspectFit" class="w-35 h-30">
							</image>
						</view>
					</view>
					<view class="Afont font-20 padding-left-8 padding-top-5" @click="godetail(item.id)">
						剩余库存:{{item.stock}}
					</view>
				</view>

				<!-- 春季皮肤 -->
				<view class="list_item w-210 h-350 radius-14 margin-bottom-35 itemqing" v-for="(item,index) in comlist"
					:key="index" v-if="skin == 'qing'">

					<view class="w-210 h-200 text-center radius-15 overhid imgaqing" @click="godetail(item.id)">

						<image v-if="item.stock == 0" class="w100 h100 bgc" :src=" Imgbase+'/1zhan_selled.png'"
							mode="aspectFill">
						</image>

						<image v-else class="w100 h100 radius-15" :src="item.adimage" mode="aspectFill"></image>
					</view>

					<view class="Afont item_text w100 two-line font-24 h-65" @click="godetail(item.id)">
						{{item.name}}
					</view>

					<view class="flex-between h-40">
						<view class="padding-left-8" @click="godetail(item.id)">
							<view class="item_price font-22  Afont" v-if="item.price !== '0.00'">
								<!-- <text v-if="spaceid > 0">红豆:</text> -->
								<text>￥</text>
								<text class="font-30">{{item.price}}</text>
							</view>
							<view class="item_price font-28 Afont" v-if="item.score > 0">
								积分:{{item.score}}
							</view>
						</view>
						<view class="padding-top-20 padding-right-10" @click="islike(item.id,index)">
							<image :src=" Imgbase+'/new_goodmall_img2.png'" v-if="item.is_collect == 0" mode="aspectFit"
								class="w-35 h-30">
							</image>
							<image :src=" Imgbase+'/new_goodmall_img3.png'" v-else mode="aspectFit" class="w-35 h-30">
							</image>
						</view>
					</view>
					<view class="Afont font-20 padding-left-8 padding-top-5" @click="godetail(item.id)">
						剩余库存:{{item.stock}}
					</view>
				</view>

				<view class="list_item w-210 h-350 radius-14 margin-bottom-35" v-for="(item,index) in comlist"
					:key="index"
					:style="{background:'url('+Imgbase+'/'+skin+'_goodindex_img6.png)','background-size':'100% 100%',}"
					v-if="skin == 'winter'||skin == 'classics'||skin == 'summer'">

					<view class="w-210 h-200 text-center radius-15 overhid"
						:class="skin == 'classics'?'imga':'imgawinter'" @click="godetail(item.id)">

						<image v-if="item.stock == 0" class="w100 h100 bgc" :src=" Imgbase+'/1zhan_selled.png'"
							mode="aspectFill">
						</image>

						<image v-else class="w100 h100 radius-15" :src="item.adimage" mode="aspectFill"></image>
					</view>

					<view class="Afont item_text w100 two-line font-24 h-65" @click="godetail(item.id)">
						{{item.name}}
					</view>

					<view class="flex-between h-40">
						<view class="padding-left-8" @click="godetail(item.id)">
							<view class="item_price font-22  Afont" v-if="item.price !== '0.00'">
								<!-- <text v-if="spaceid > 0">红豆:</text> -->
								<text>￥</text>
								<text class="font-30">{{item.price}}</text>
							</view>
							<view class="item_price font-28 Afont" v-if="item.score > 0">
								积分:{{item.score}}
							</view>
						</view>
						<view class="padding-top-20 padding-right-10" @click="islike(item.id,index)">
							<image :src=" Imgbase+'/new_goodmall_img2.png'" v-if="item.is_collect == 0" mode="aspectFit"
								class="w-35 h-30">
							</image>
							<image :src=" Imgbase+'/new_goodmall_img3.png'" v-else mode="aspectFit" class="w-35 h-30">
							</image>
						</view>
					</view>
					<view class="Afont font-20 padding-left-8 padding-top-5" @click="godetail(item.id)">
						剩余库存:{{item.stock}}
					</view>

				</view>

				<view class="h-300 w100 fl">

				</view>
			</scroll-view>
		</view>


		<view class="h-300">

		</view>

		<!-- <view class="w-200 h-200" style="right: 20rpx;bottom: 300rpx;background-color: red;position: fixed;"
			@click="gofree">

		</view> -->

		<!-- 夏季皮肤 -->
		<view class=" padding-bottom-25 w100 h-160 tabbars " v-if="skin == 'summer'">
			<view class="flex-between h-120" style="position: relative;z-index: 9999;">
				<view class="" @click="seletab(1)">
					<view class="w-130 h-130 text-center">
						<image :src=" Imgbase+'/summer_goodtab1.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
				<view class="" @click="seletab(2)">
					<view class="w-140 h-130 text-center">
						<image :src=" Imgbase+'/summer_goodtab2.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
				<view class="" @click="seletab(3)">
					<view class="w-130 h-130 text-center ">
						<image :src=" Imgbase+'/summer_goodtab3.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
				<view class="" @click="seletab(4)">
					<view class="w-140 h-140 text-center">
						<image :src=" Imgbase+'/summer_goodtab4.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
				<view class="padding-top-10" @click="seletab(5)">
					<view class="w-130 h-130 text-center">
						<image :src=" Imgbase+'/summer_goodtab5.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
			</view>
			<view class="bgcsqing w100 h-110"
				:style="{background:'url('+Imgbase+'/summer_goodbgc.png)','background-size':'100% 100%',}">

			</view>
		</view>

		<!-- 经典皮肤 -->
		<view class="w100 h-160 tabbars " v-if="skin == 'classics'">
			<view class="flex-between h-140" style="position: relative;z-index: 9999;">
				<view class="" @click="seletab(1)">
					<view class="w-120 h-120 text-center">
						<image :src=" Imgbase+'/new_good_tab1.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
				<view class="" @click="seletab(2)">
					<view class="w-120 h-120 text-center">
						<image :src=" Imgbase+'/new_good_tab2.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
				<view class="" @click="seletab(3)">
					<view class="w-120 h-140 text-center padding-bottom-10">
						<image :src=" Imgbase+'/new_good_tab3.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
				<view class="" @click="seletab(4)">
					<view class="w-120 h-120 text-center">
						<image :src=" Imgbase+'/new_good_tab4.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
				<view class="padding-bottom-10" @click="seletab(5)">
					<view class="w-120 h-120 text-center">
						<image :src=" Imgbase+'/new_good_tab5.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
			</view>
			<view class="bgcs">

			</view>
			<view class="bgcs_top">

			</view>
		</view>

		<!-- 冬季皮肤 -->
		<view class="w100 h-160 tabbars " v-if="skin == 'winter'">

			<view class="flex-between h-140" style="position: relative;z-index: 9999;">
				<view class="padding-bottom-50" @click="seletab(1)">
					<view class="w-130 h-150 text-center ">
						<image :src=" Imgbase+'/winter_goodtab1.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
				<view class="padding-bottom-15" @click="seletab(2)">
					<view class="w-120 h-120 text-center">
						<image :src=" Imgbase+'/winter_goodtab2.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
				<view class="padding-bottom-20" @click="seletab(3)">
					<view class="w-125 h-125 text-center">
						<image :src=" Imgbase+'/winter_goodtab3.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
				<view class="" @click="seletab(4)">
					<view class="w-115 h-115 text-center">
						<image :src=" Imgbase+'/winter_goodtab4.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
				<view class="padding-bottom-15" @click="seletab(5)">
					<view class="w-120 h-120 text-center">
						<image :src=" Imgbase+'/winter_goodtab5.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
			</view>
			<view class="bgcswinter">

			</view>
			<view class="bgcs_topwinter">

			</view>
		</view>

		<!-- 新年皮肤 -->
		<view class="w100 h-160 tabbars " v-if="skin == 'newyear'">
			<view class="flex-between h-120" style="position: relative;z-index: 9999;">
				<view class="" @click="seletab(1)">
					<view class="w-120 h-120 text-center">
						<image :src=" Imgbase+'/newyear_goodtab1.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
				<view class="" @click="seletab(2)">
					<view class="w-120 h-120 text-center">
						<image :src=" Imgbase+'/newyear_goodtab2.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
				<view class="" @click="seletab(3)">
					<view class="w-120 h-120 text-center ">
						<image :src=" Imgbase+'/newyear_goodtab3.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
				<view class="" @click="seletab(4)">
					<view class="w-120 h-120 text-center">
						<image :src=" Imgbase+'/newyear_goodtab4.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
				<view class="padding-bottom-10" @click="seletab(5)">
					<view class="w-120 h-120 text-center">
						<image :src=" Imgbase+'/newyear_goodtab5.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
			</view>
			<view class="bgcsnewyear w100 h-200"
				:style="{background:'url('+Imgbase+'/newyear_goodbgc.png)','background-size':'100% 100%',}">

			</view>
		</view>

		<!-- 春季皮肤 -->
		<view class=" padding-bottom-25 w100 h-160 tabbars " v-if="skin == 'qing'">
			<view class="flex-between h-120" style="position: relative;z-index: 9999;">
				<view class="" @click="seletab(1)">
					<view class="w-130 h-130 text-center">
						<image :src=" Imgbase+'/qing_goodtab1.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
				<view class="" @click="seletab(2)">
					<view class="w-130 h-130 text-center">
						<image :src=" Imgbase+'/qing_goodtab2.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
				<view class="" @click="seletab(3)">
					<view class="w-130 h-130 text-center ">
						<image :src=" Imgbase+'/qing_goodtab3.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
				<view class="" @click="seletab(4)">
					<view class="w-130 h-130 text-center">
						<image :src=" Imgbase+'/qing_goodtab4.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
				<view class="padding-top-10" @click="seletab(5)">
					<view class="w-130 h-130 text-center">
						<image :src=" Imgbase+'/qing_goodtab5.png'" mode="aspectFit" class="w100 h100 margin-top-10">
						</image>
					</view>
				</view>
			</view>
			<view class="bgcsqing w100 h-110"
				:style="{background:'url('+Imgbase+'/qing_goodbgc.png)','background-size':'100% 100%',}">

			</view>
		</view>

		<u-popup :show="dateshow" @close="dateshow = false" mode="center" round="25" bgColor="transparent"
			:closeOnClickOverlay="false">
			<view class="padding-40 margin-auto radius-25 Afont" style="width: 90%;background-color: #fff;">
				<view class="text-center font-35">
					提示
				</view>
				<view class="padding-top-25">
					请注意您的资金以及货物安全，本公司无回收商，请将货物发至您自己手中，因此产生的风险与平台无关。因监管要求，如发现异常发货与交易情况，可能会对账号进行限制。
				</view>
				<view class="padding-top-15">
					如您点击“我已知晓”按键，便视为您同意此规则
				</view>
				<view class="flex-between padding-top-30 padding-left-20 padding-right-20">
					<view class="w-250 h-70 flex-center radius-12" style="color: #424242;background-color: #d1d1d1;"
						@click="seletab(1)">
						拒绝
					</view>

					<view class="w-250 h-70 flex-center radius-12" style="color: #fff;background-color: #5AC725;"
						@click="ondate()">
						我已知晓
					</view>
				</view>
			</view>
		</u-popup>

	</view>
</template>

<script>
	export default {
		name: "myluck",
		data() {
			return {
				Imgbase: getApp().globalData.Imgbase,
				PageCur: 3,
				seleid: 0,
				seleon: 0,
				seleontwo: 0,
				selename: [],
				scrollLeft: 0,
				scrollLefttwo: 0,
				page: 1,
				stat: 0,
				comlist: [],
				seleids: [],
				canBuyNum: 0,
				twolist: [],
				shop_classify_s_id: 0,
				spaceid: 0,
				eid: 0,
				nowdate: '',
				dateshow: false,
				spdesc: '',
				skin: 'classics',
				Instructions: '',
			};
		},
		onLoad() {
			this.classify(0)
		},
		onShow() {
			uni.hideTabBar()
			this.getdate()

			if (uni.getStorageSync('skin')) {
				this.skin = uni.getStorageSync('skin')
			}
		},
		onShareAppMessage(res) {
			let _this = this;
			return {
				title: '',
				path: '/pages/index/kpindex',
				imageUrl: 'https://oqyf-1305090490.cos.ap-shanghai.myqcloud.com/front/1zhan_new_logo.png',
			}
		},
		methods: {
			gorecycle() {
				uni.navigateTo({
					url: '/pagesA/recycle/index'
				})
			},
			onbottom() {
				this.page++;
				if (this.spaceid == 0) {
					this.goodlist(this.selename[this.seleon].id, this.twolist[this.seleontwo].id)
				} else {
					this.specialGoods(this.eid)
				}
				if (this.stat == 1) {
					this.$refs.uToast.show({
						message: '没有更多了'
					})
				}
			},
			gofree() {
				uni.navigateTo({
					url: '/pagesA/free/index'
				})
			},
			// 我已知晓
			ondate() {
				var date = new Date(),
					month = date.getMonth() + 1, //月 getMonth()：0 ~ 11
					day = date.getDate().toString(); //日 getDate()：(1 ~ 31)

				this.nowdate = month + day
				uni.setStorageSync('date', this.nowdate)
				this.dateshow = false

			},
			// 获取当前时间  弹出模态框
			getdate() {
				let _this = this
				var date = new Date(),
					month = date.getMonth() + 1, //月 getMonth()：0 ~ 11
					day = date.getDate().toString(); //日 getDate()：(1 ~ 31)

				this.nowdate = month + day
				if (uni.getStorageSync('date') == '') {
					_this.dateshow = true
				}
				if (uni.getStorageSync('date') !== this.nowdate) {
					_this.dateshow = true
				}

			},
			// 收藏
			async islike(e, index) {
				// return
				let _this = this
				let item = await this.$api.post('shop/goodCollect', {
					token: uni.getStorageSync('token'),
					id: e,
					special: this.spaceid
				})
				if (item.data.state == 1) {
					this.comlist[index].is_collect = 1
				} else {
					this.comlist[index].is_collect = 0
				}
				uni.showToast({
					icon: 'none',
					title: item.data.tip
				});
			},
			godetail(e) {
				if (this.spaceid == 0) {
					uni.navigateTo({
						url: '/pages/index/detail?id=' + e
					})
				} else {
					uni.navigateTo({
						url: '/pagesA/advanced/detail?id=' + e
					})
				}

			},
			seletwo(i, e, pid) {
				this.seleontwo = i
				this.comlist = []
				if (pid == -1) {
					// 特价区
					this.spaceid = 1
					this.eid = e
					this.specialGoods(e)
				} else {
					this.goodlist(this.selename[this.seleon].id, e)
				}
			},
			sele(i, e, index) {
				this.seleon = index
				this.seleid = i
				this.seleontwo = 0
				this.comlist = []
				this.page = 1

				if (i == -1) {
					// 特价区
					this.spaceid = 1
					this.specialCategory()
					this.specialGoods(i, e)
				} else {
					this.spaceid = 0
					this.goodlist(i, e)
					this.classify()
				}

			},
			// 获取特价区分类
			async specialCategory(i, e) {
				let _this = this
				let item = await this.$api.post('shop/specialCategory', {

				})
				item.data.list.unshift({
					id: 0,
					name: '全部'
				})
				item.data.list.forEach(function(it) {
					it.pid = -1
				})
				_this.twolist = item.data.list
			},
			tabSelect(e) {
				this.scrollLeft = (e.currentTarget.dataset.id - 1) * 70;
				this.page = 1;
				// this.list = [];
				// this.hasData = true;
			},
			tabSelecttwo(e) {
				this.scrollLefttwo = (e.currentTarget.dataset.id - 1) * 70;
				this.page = 1;
				// this.list = [];
				// this.hasData = true;
			},
			// 获取分类
			async classify(i, type) {
				let _this = this
				let item = await this.$api.post('shop/classify', {
					// token: uni.getStorageSync('token'),
				})
				if (i == 0) {
					this.seleid = item.data.list[0].id
					this.goodlist(this.seleid, type)
				}
				item.data.list.forEach(function(it) {
					it.child.unshift({
						id: 0,
						pid: it.id,
						name: '全部'
					})
					if (_this.seleid == it.id) {
						_this.twolist = it.child
					}
				})
				this.spdesc = item.data.sp_list.desc
				console.log(_this.seleid)
				_this.selename = item.data.list
				_this.selename.splice(1, 0, {
					name: item.data.sp_list.name,
					id: -1
				})
				this.$forceUpdate()
				// this.goodlist()
			},
			// 获取商城列表
			async goodlist(i, e, type) {
				let _this = this
				let item = await this.$api.post('shop/goodlist', {
					page: _this.page,
					token: uni.getStorageSync('token') == "" ? "" : uni.getStorageSync('token'),
					shop_classify_id: i ? i : _this.selename[0].id,
					shop_classify_s_id: e
				})
				console.log(type)
				if (type == 0) {
					this.comlist = []
					this.comlist = item.data.list
				} else {
					_this.comlist = _this.comlist.concat(item.data.list)
				}
				this.canBuyNum = item.data.canBuyNum
				this.$forceUpdate()
			},
			// 获取特价区列表
			async specialGoods(e) {
				let _this = this
				let item = await this.$api.post('shop/specialGoods', {
					page: _this.page,
					token: uni.getStorageSync('token') == "" ? "" : uni.getStorageSync('token'),
					category_id: e
					// shop_classify_s_id: e
				})
				// this.comlist = item.data.list
				this.canBuyNum = item.data.canBuyNum
				_this.comlist = _this.comlist.concat(item.data.list)
			},
			seletab(i) {
				switch (i) {
					case 1:
						uni.switchTab({
							url: '/pages/goodspoor/index'
						})
						break;
					case 2:
						uni.switchTab({
							url: '/pages/goodspoor/backpack'
						})
						break;
					case 3:
						uni.switchTab({
							url: '/pages/index/kpindex'
						})
						break;
					case 4:
						uni.switchTab({
							url: '/pages/goodspoor/socity'
						})
						break;
					case 5:
						uni.switchTab({
							url: '/pages/goodspoor/user'
						})
						break;
				}
			},
		},
		onReachBottom() {
			this.page++;
			if (this.spaceid == 0) {
				this.goodlist(this.selename[this.seleon].id, this.twolist[this.seleontwo].id)
			} else {
				this.specialGoods(this.eid)
			}
			if (this.stat == 1) {
				this.$refs.uToast.show({
					message: '没有更多了'
				})
			}
		},
	}
</script>

<style lang="scss" scoped>
	button {
		border: none;
	}

	.bgc {
		background-color: rgba(0, 0, 0, .8);
	}

	.tab_item {
		margin-right: 35rpx;
		display: inline-block;

		.heng {
			background-color: #8B5F52;
			margin: 10rpx auto 0;
		}

		.hengwinter {
			background-color: #272636;
			margin: 10rpx auto 0;
		}

		.hengnewyear {
			background-color: #DF1C18;
			margin: 10rpx auto 0;
		}
	}

	.open {
		font-size: 40rpx;
		font-weight: bold;
		color: #F9FADA;
		-webkit-text-stroke: 2rpx #8B5F52;
	}

	.openwinter {
		font-size: 40rpx;
		font-weight: bold;
		color: #fff;
		-webkit-text-stroke: 2rpx #272636;
	}

	.opennewyear {
		font-size: 40rpx;
		font-weight: bold;
		color: #fff;
		-webkit-text-stroke: 2rpx #DF1C18;
	}

	.openqing {
		font-size: 40rpx;
		font-weight: bold;
		color: #fff;
		-webkit-text-stroke: 2rpx #1B431B;
	}

	.opend {
		font-size: 30rpx;
		font-weight: bold;
		color: #272636;
	}

	.no_open {
		font-size: 32rpx;
		color: #A5A2A3;
	}

	.itemnewyear {
		background-color: rgba(255, 246, 166, .8);
	}

	.itemqing {
		background-color: rgba(27, 67, 27, .3);
		color: #1B431B;
	}

	.list_item {
		float: left;
		margin-right: 22rpx;

		.imga {
			border: 4rpx solid #8B5F52;
		}

		.imgawinter {
			border: 4rpx solid #5C5C92;
		}

		.imganewyear {
			border: 4rpx solid #DF1C18;
		}

		.imgaqing {
			border: 4rpx solid #1B431B;
		}

		.item_hot {
			position: absolute;
			z-index: 100;
			top: -30rpx;
			right: -28rpx;
		}

		.item_bgc {
			position: absolute;
			z-index: 0;
			top: 0;
			left: 0;
		}


		.item_num {
			position: absolute;
			z-index: 10;
			left: 128rpx;
			font-size: 22rpx;
			margin-top: 16rpx;
		}

		.item_text {
			padding: 0 8rpx;
		}

		.item_price {
			color: #E60403;
		}
	}

	.list_item:nth-child(3n) {
		margin-right: 0rpx;
	}

	.i_large {
		width: 180rpx;
		height: 60rpx;
	}

	.i_small {
		width: 160rpx;
		height: 50rpx;
	}

	.i_larges {
		width: 210rpx;
		height: 90rpx;
	}

	.i_smalls {
		width: 190rpx;
		height: 70rpx;
	}

	.auto {
		margin: 0 auto;
	}

	button::after {
		border: initial;
	}
</style>